import request from '@/utils/request.js'
//获取当前维护上报项目
export function pageProject(data) {
  return request({
    url: `business/zdhjcmaintaintask/pageMaintainPerson`,
    method: 'GET',
	params:data,
  })
}
//根据id查询维护任务详情
export function findSubProjects(maintainTaskId) {
  return request({
    url: `business/zdhjcmaintaintask/gaugingPoint/detail/`+maintainTaskId ,
    method: 'GET',
  })
}
// //根据id查询维护任务详情
// export function findSubProjects(data) {
//   return request({
//     url: `business/zdhjcmaintaintask/basicInfo`,
//     method: 'GET',
// 	params:data
//   })
// }
// 根据测点id获取维护内容和维护图片（详情页）
export function findSubProjectsPic(data) {
  return request({
    url: `business/zdhjcmaintaintemplate/sub/`+data.maintainId,
    method: 'GET',
  })
}
// 根据维护上报id获取设备详情
export function findSubProjectsAddress(data) {
  return request({
    url: `business/zdhjcmaintaintask/pointInfo`,
    method: 'GET',
	params:data
  })
}
//提交审核
export function submitReview(data) {
  return request({
    url: `business/zdhjcmaintaintask/detail/submit`,
    method: 'POST',
	params:data
  })
}
export function getFileById(id) {
	return request({
		url: `admin/sys-file/getFileById` + '?id=' + id,
		method: 'get',
		options: {
			responseType: 'arraybuffer',
		}
	})
}
// 完成维护并提交
export function finishedSave(maintainTaskId) {
	return request({
		url: `business/zdhjcmaintaintask/status/`+maintainTaskId,
		method: 'put',
	})
}
// 维护详情
export function getDetail(standardProId,subProjectId,maintainTaskId) {
	return request({
		url: `business/zdhjcmaintaintask/gaugingPoint/detail/`+standardProId+'/'+subProjectId+'/'+maintainTaskId,
		method: 'get',
	})
}